Workflow.openJobAndCompleteFirstTask

Opens a new workflow job for the process with name processName and completes the first task designated by firstTaskId with completion state completionState. Any parameters declared as workflow out parameters for the current form are passed into the workflow job.

This method differs from method #openJob(String, Map, String, String) in that this method allows the form that opens the job to be included as part of the workflow process. This is useful when there is a need to assign a subsequent task to the person who submitted the initial request, or there is a need to branch back to the initial task within the process logic. When this method is used, the first task must have an assignment of either Public or Job Opener.

Note that parameters are passed into this method by declaring them as workflow out parameters on the invoking form i.e. these are task level parameters. This is in contrast to method #openJob(String, Map, String, String) where parameters are passed by declaring them as in parameters for the workflow process i.e. these are process level parameters.

returns java.lang.String

Parameters

java.lang.String  processName,  java.lang.String  firstTaskId,  java.lang.String  completionState,  java.lang.String  owner,  java.lang.String  reason,